package interaction;

import java.util.HashMap;

public class Protocol
{
  public ProtocolType m_protocol;
  public String m_name;
  public static HashMap<String, Protocol> m_protocolMap = new HashMap<String, Protocol>();  
  
  public static Protocol[] m_protocols =
  {
    new Protocol(ProtocolType.UDP, "UDP"),
    new Protocol(ProtocolType.TCP, "TCP"), 
    new Protocol(ProtocolType.RMI, "RMI"),
    new Protocol(ProtocolType.CORBA, "CORBA")
  };
  
  static
  {   
    for(int i = 0; i<m_protocols.length; ++i)
      m_protocolMap.put(m_protocols[i].m_name, m_protocols[i]);
  }
  
  public Protocol(ProtocolType prot, String name)
  {
    m_protocol = prot;
    m_name = name;
  }
}
